d="hubei"
print(d[-1]+d[1:-1]+d[0])

d="student"
print(d[-1]+d[1:-1]+d[0])